package demo0;

public class Complex_0310 {
    private double real;
    private double imag;;
    public Complex_0310(double real, double imag) {
        this.real = real;
        this.imag = imag;
    }
    public Complex_0310() {
        this.real = 0.0;
        this.imag = 0.0;
    }
    public Complex_0310 add(Complex_0310 c) {

        return new Complex_0310(this.real + c.real, this.imag + c.imag);
    }
    public Complex_0310 subtract(Complex_0310 c) {

        return new Complex_0310(this.real - c.real, this.imag - c.imag);
    }
    public void print() {
        System.out.println("(" + this.real + ", " + this.imag + ")");
    }
}
